package com.shard.service;

import com.shard.mapper.ShardMapper;
import io.shardingsphere.core.constant.transaction.TransactionType;
import io.shardingsphere.core.transaction.TransactionTypeHolder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;


/**
 * @author: LCG
 * 作者: LCG
 * 日期: 2021/4/1  8:39
 * 描述:
 */
@Service
public class TestShardService {

    @Autowired
    private ShardMapper shardMapper;


    public int insert(Map<String,Object> map){

        int i = shardMapper.addOne(map);
        return i;
    }
    public int insertItem(Map<String,Object> map){

        int i = shardMapper.addItemOne(map);
        return i;
    }




    public List<Map<String,Object>> getList(Map<String,Object> map){
        return shardMapper.getList(map);
    }

    public List<Map<String,Object>> getListOrderItem(Map<String,Object> map){
        return shardMapper.getOrderItem();
    }


}
